import 'package:flutter/material.dart';

class MainPageApp extends StatelessWidget
{
      @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new MaterialApp(
              title: 'MaterialApp 示例',
              home: HomePage(),
    );
  }
}

//这是一个可改变的widget
class HomePage extends StatefulWidget
{
      @override
      _HomePageState createState() {
    // TODO: implement createState
    return _HomePageState();
  }
}

class _HomePageState extends State<HomePage>
{
      @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new Scaffold(
              appBar: AppBar(
                    title: Text('MaterialApp 示例') ,

              ),
              body: new Center(
                      child: Text('主页'),
              ),
    );
  }
}